<?php
namespace app\admin\controller;
use app\admin\common\Base;
use think\Exception;
use think\Db;
use think\facade\Request;
use app\admin\model\SystemSetting;
use app\admin\service\CallCenter as CC;

class CallCenter extends Base
{
    //点击拨号
    public function clickcall(CC $cc){
        $exten = session('admin.extennum');
        $phone = $this->request->post('callee_phone','');
        $retApi =  $cc->clickcall($exten, $phone);
        return json($retApi);
    }

    //转接
    public function transfer(CC $cc){
        $exten = session('admin.extennum');
        $phone = $this->request->post('transfer_phone','');
        $retApi =  $cc->transfer($exten, $phone);
        return json($retApi);
    }


    //多方通话
    public function multicall(CC $cc){
        $exten = session('admin.extennum');
        $phone = $this->request->post('invite_phone','');
        $retApi =  $cc->multicall($exten, $phone);
        return json($retApi);
    }

}